﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kokomo.Mirror.CliMetadata
{
	abstract class CliSyntheticType : CliTypeBase
	{
		private Type _elementType;

		internal CliSyntheticType(
			CliMemberBasicInfo basicInfo,
			Type elementType
			)
			: base(basicInfo)
		{
			this._elementType = elementType;
		}

		public override int MetadataToken
		{
			get
			{
				return 0;
			}
		}

		public override Type BaseType
		{
			get { return null; }
		}

		public override Type[] GetGenericArguments()
		{
			return Type.EmptyTypes;// this._elementType.GetGenericArguments();
		}

		protected override System.Reflection.TypeAttributes GetAttributeFlagsImpl()
		{
			return System.Reflection.TypeAttributes.AnsiClass;
		}

		public override string Namespace
		{
			get { return this._elementType.Namespace; }
		}
		protected override bool HasElementTypeImpl()
		{
			return true;
		}
		public override Type GetElementType()
		{
			return this._elementType;
		}
	}
}
